import router from './router'
import store from './store'

router.beforeEach((to, from, next) => {
  let per = store.state.permission.ruleList  || localStorage.getItem('ruleList')
  if(per && per.indexOf(to.path) > -1){
  
    let obj = {
      data: to,
      isRemove:false 
    }
    store.dispatch('SetSelectMenu',obj)
  }
  next()

  
 

  
})

